package com.market.cart.common.domain;

import java.math.BigDecimal;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.market.common.core.annotation.Excel;
import com.market.common.core.web.domain.BaseEntity;

/**
 * 购物车对象 cart_info
 *
 * @author market
 * @date 2024-02-29
 */
@Data
public class CartInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 购物车id */
    private Integer cartInfoId;

    /** 地址ID */
    @Excel(name = "地址ID")
    private Integer addressId;

    /** 商品数量 */
    @Excel(name = "商品数量")
    private BigDecimal cartInfoNum;

    /** 外键,关联SKU表,表示具体商品规格 */
    @Excel(name = "外键,关联SKU表,表示具体商品规格")
    private Integer skuId;

    /** 优惠券ID */
    @Excel(name = "优惠券ID")
    private Integer couponId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    private BigDecimal price;

    private String sku;

    private String name;

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getSku() {
        return sku;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setCartInfoId(Integer cartInfoId)
    {
        this.cartInfoId = cartInfoId;
    }

    public Integer getCartInfoId()
    {
        return cartInfoId;
    }
    public void setAddressId(Integer addressId)
    {
        this.addressId = addressId;
    }

    public Integer getAddressId()
    {
        return addressId;
    }
    public void setCartInfoNum(BigDecimal cartInfoNum)
    {
        this.cartInfoNum = cartInfoNum;
    }

    public BigDecimal getCartInfoNum()
    {
        return cartInfoNum;
    }
    public void setSkuId(Integer skuId)
    {
        this.skuId = skuId;
    }

    public Integer getSkuId()
    {
        return skuId;
    }
    public void setCouponId(Integer couponId)
    {
        this.couponId = couponId;
    }

    public Integer getCouponId()
    {
        return couponId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("cartInfoId", getCartInfoId())
            .append("addressId", getAddressId())
            .append("cartInfoNum", getCartInfoNum())
            .append("skuId", getSkuId())
            .append("couponId", getCouponId())
            .append("createTime", getCreateTime())
            .append("userId", getUserId())
            .append("price", getPrice())
            .append("sku", getSku())
            .append("name", getName())
            .toString();
    }
}
